//
//  ModifyUserPWFirstInputController.m
//  HuLaQuan
//
//  Created by hok on 1/21/16.
//  Copyright © 2016 Jianghao. All rights reserved.
//

#import "ModifyUserPWFirstInputController.h"

#import "ModifyUserPWRetypePasswordController.h"

@interface ModifyUserPWFirstInputController ()

@end

@implementation ModifyUserPWFirstInputController

-(NSString *)finish:(NSString *)pwd{
    
    [self.passwordAndInfos setObject:pwd forKey:@"password"];
    NSLog(@"%@",self.passwordAndInfos);
    [self performSegueWithIdentifier:@"ShowModifyRetypePasswordFromFirst" sender:self];
    return pwd;
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Navigation
- (void)goBackAction
{
    UIAlertController *x = [UIAlertController alertWithTitle:@"提示" andMessage:@"是否放弃修改登录密码" andBlock:^(UIAlertAction *action ) {
        if ([action.title isEqualToString:@"好的"]) {
            [self.navigationController popToViewController:self.navigationController.viewControllers[1] animated:YES];
        }
        
    }  type:@"confirmAndCancel"];
    [self presentViewController:x animated:YES completion:nil];
}
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
    if ([segue.identifier isEqualToString:@"ShowModifyRetypePasswordFromFirst"]) {
        ModifyUserPWRetypePasswordController *con = (ModifyUserPWRetypePasswordController *)[segue destinationViewController];
        con.passwordAndInfos = self.passwordAndInfos;
        con.titleOfNav = self.titleOfNav;
        con.titleOfPassword = kPasswordRetypeHint;
        // con.type = self.type;
    }
}

@end
